package axonactive.vision.training.dao;

import java.util.List;

import axonactive.vision.training.entity.Examination;
import ch.ivyteam.ivy.environment.Ivy;
import ch.ivyteam.ivy.process.data.persistence.IIvyEntityManager;

public class ExaminationDAO {
private IIvyEntityManager entityManager;
	
	public ExaminationDAO(){
		entityManager = Ivy.persistence().get("IvyTraining");
	}
	
	public List<Examination> getAllExam(){
		return entityManager.findAll(Examination.class);
	}
	
	public void removeExam(Examination exam){
		entityManager.remove(exam);
	}
	
	public Examination mergeExam(Examination exam){
		return entityManager.merge(exam);
	}
}
